From: kaf24@firebug.cl.cam.ac.uk Date: Thu, 1 Jun 2006 20:34:47 +0000 (+0100) Subject: Allow all trace-buffer hypercalls to be executed even when tracing is currently disabled. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15972^2~49^2~29 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=6af99de37cd929601c69ed3232d4411b8564b8fd;p=xen.git Allow all trace-buffer hypercalls to be executed even when tracing is currently disabled. From: George Dunlap Signed-off-by: Keir Fraser --- diff --git a/xen/common/trace.c b/xen/common/trace.c index 0cee7126d2..6a7827299a 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -178,20 +178,12 @@ int tb_control(dom0_tbufcontrol_t *tbc) spin_lock(&lock); - if ( !tb_init_done && - (tbc->op != DOM0_TBUF_SET_SIZE) && - (tbc->op != DOM0_TBUF_ENABLE) ) - { - spin_unlock(&lock); - return -EINVAL; - } - switch ( tbc->op ) { case DOM0_TBUF_GET_INFO: tbc->cpu_mask = tb_cpu_mask; tbc->evt_mask = tb_event_mask; - tbc->buffer_mfn = __pa(t_bufs[0]) >> PAGE_SHIFT; + tbc->buffer_mfn = opt_tbuf_size ? virt_to_mfn(t_bufs[0]) : 0UL; tbc->size = opt_tbuf_size * PAGE_SIZE; break; case DOM0_TBUF_SET_CPU_MASK: